/*
 * @Author       : wfl
 * @LastEditors: fj
 * @description  :
 * @updateInfo   :
 * @Date         : 2023-07-26 11:28:16
 * @LastEditTime: 2023-08-09 13:54:31
 */
import type { ISearchForm } from '@/global/enums/search'
const useFields = () => {
  const defKeys = useTableKey()
  const fieldList: Ref<ISearchForm[]> = ref([
    {
      key: 'businessName',
      label: '模块',
      show: true,
      width: 120,
      search: true,
      formProp: {
        clearable: true
      }
    },
    {
      key: 'messageTemplateKey',
      label: '编号',
      show: true,
      minWidth: 100,
      search: true
    },
    {
      key: 'messageTemplateTitle',
      label: '标题',
      show: true,
      minWidth: 140,
      search: true
    },
    {
      key: 'channelNames',
      label: '推送渠道',
      show: true,
      minWidth: 160,
      tableSlot: 'channelNames',
      search: true
    },
    ...defKeys,
    {
      key: '',
      label: '操作',
      show: true,
      width: 106,
      tableSlot: 'operate',
      fixed: 'right'
    }
  ])

  return {
    fieldList
  }
}

export default useFields
